<!DOCTYPE html>
<html>

<head>
  <meta charset=utf-8>
  <meta http-equiv=X-UA-Compatible content="IE=edge">
  <meta name=viewport content="width=device-width,initial-scale=1">
  <link rel="stylesheet" href="./action_deploy.css">
</head>

<body>

  <!-- 以下为初始状态 -->
  <div id="main">
    <div class="header">
      零售订单小助手
    </div>
    <div class="input">
      <div>
        <span><span class="require">*</span>店铺类型:</span>
        <select name="channel" id="channelSelect">
          <option value='0' disabled selected style='display:none;'>请选择店铺类型</option>
          <option value="3">淘宝</option>
          <option value="6">天猫</option>
          <option value="8" disabled>京东（即将开放）</option>
        </select>
      </div>
      <span class="err"></span>
    </div> 
    <div class="input">
      <div>
        <span><span class="require">*</span>客易达店铺ID:</span>
        <input name="retail_shop_id" type="text" id="retailShopIdInput" placeholder="请输入客易达店铺ID">
      </div>
      <span class="err"></span>
    </div>
    <div class="input">
      <div>
        <span><span class="require">*</span>店铺ID:</span>
        <input name="external_shop_id" type="text" id="externalShopIdInput" placeholder="请输入店铺ID">
      </div>
      <span class="err"></span>
    </div>
    <div class="input">
      <div>
        <span><span class="require">*</span>店铺名称:</span>
        <input name="shop_name" type="text" id="shopNameInput" placeholder="请输入店铺名称">
      </div>
      <span class="err"></span>
    </div>
    <div class="input">
      <div>
        <span><span class="require">*</span>淘宝账号名:</span>
        <input name="external_shop_account" type="text" id="externalShopAccountInput" placeholder="请输入淘宝账号名">
      </div>
      <span class="err"></span>
    </div>
    <div class="input">
      <div>
        <span><span class="require">*</span>App Key:</span>
        <input name="app_key" type="text" id="appKeyInput" placeholder="请输入App Key">
      </div>
      <span class="err"></span>
    </div>
    <div class="input">
      <div>
        <span><span class="require">*</span>App Secret:</span>
        <input name="app_secret" type="text" id="appSecretInput" placeholder="请输入App Secret">
      </div>
      <span class="err"></span>
    </div>
    <div class="tips">脚本运行期间会实时监控页面数据变化，请不要操作页面；运行前，请连接测试，连接成功后，开始运行。</div>
    <div class="bottom">
      <div class="msg">
        <span id="error"></span>
        <span id="success"></span>
      </div>
      <div class="btns">
        <button id="connect">连接测试</button>
        <button id="launch">启动</button>
      </div>
    </div>
  </div>


  <!-- 以下为运行中状态 -->
  <div id="looping">
    <div class="header">
      零售订单小助手
    </div>
    <div class="store_info">
      <div class="store_logo">
        <img id="store_logo" src="" alt="">
      </div>
      <div id="store_name" class="store_name"></div>
      <div id="store_status" class="store_status">运行中</div>
    </div>
    <div class="overview_title">
      <span class="overview_text">数据概览</span>
      <span id="looping_start_time"></span>
    </div>
    <div class="overview">
      <div id="orders" class="overview_item">
        <div class="overview_item_title">订单数</div>
        <div id="total_order_full" class="overview_item_total">0</div>
        <div class="overview_item_today">今日：<span id="today_order_full" class="num_today">0</span></div>
      </div>
      <div id="goods" class="overview_item">
        <div class="overview_item_title">商品数</div>
        <div id="total_goods_full" class="overview_item_total">0</div>
        <div class="overview_item_today">今日：<span id="today_goods_full" class="num_today">0</span></div>
      </div>
      <div id="ordersMsg" class="overview_item">
        <div class="overview_item_title">订单消息处理</div>
        <div id="total_order_increment" class="overview_item_total">0</div>
        <div class="overview_item_today">今日：<span id="today_order_increment" class="num_today">0</span></div>
      </div>
      <div id="goodsMsg" class="overview_item">
        <div class="overview_item_title">商品消息处理</div>
        <div id="total_goods_increment" class="overview_item_total">0</div>
        <div class="overview_item_today">今日：<span id="today_goods_increment" class="num_today">0</span></div>
      </div>
    </div>
    <div class="bottom">
      <div class="msg">
        <span id="start_time"></span>
        <span id="error_time"></span>
      </div>
      <div class="btns">
        <button id="stop">停止</button>
      </div>
    </div>
  </div>


  <script type="text/javascript" src='../asset/js/jquery-3.5.1.min.js'></script>
  <script type="text/javascript" src='../scripts/constant.js'></script>
  <script type="text/javascript" src='./action_deploy.js'></script>
</body>
</html>
